# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=gnome-color-manager
pkgver=3.36.0+r42+g90481514
pkgrel=1
pkgdesc="GNOME Color Profile Tools"
url="https://gitlab.gnome.org/GNOME/gnome-color-manager"
arch=(x86_64)
license=(GPL2)
depends=(glib2 gtk3 colord lcms2)
makedepends=(yelp-tools git appstream-glib meson docbook-utils docbook-sgml
             perl-sgmls)
checkdepends=(xorg-server-xvfb)
groups=(gnome)
_commit=904815149a2ad20d89d34639bb6ab442db15ea1f  # master
source=("git+https://gitlab.gnome.org/GNOME/gnome-color-manager.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^GNOME_COLOR_MANAGER_//;s/_/./g;s/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  dbus-run-session xvfb-run -s '-nolisten local' \
    meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
